﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessLogicLayer;

namespace logicunivesityinventorystore.Store
{
    public partial class InputDeliveryQuantity : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_Save_Click(object sender, EventArgs e)
        {
            int count = this.gv_ord.Rows.Count;
            TextBox txt_RQ;
            TextBox txt_Remarks;
            foreach (GridViewRow row in gv_ord.Rows)
            { 
                txt_RQ=(TextBox)row.Cells[3].FindControl("txtRecQty");
                txt_Remarks = (TextBox)row.Cells[4].FindControl("txtRemarks");
                string itemCode = row.Cells[0].Text;
                string poNo = txtPoNo.Text;
                int qtyReceived = Convert.ToInt32(txt_RQ.Text);
                string remarks = txt_Remarks.Text;
                new OrderFacade().UpdateOrderDetails(poNo, itemCode, qtyReceived, remarks);
            }
        }
    }
}